﻿
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site1.Master" Inherits="System.Web.Mvc.ViewPage<MvcMusicStore.ViewModels.StoreManagerViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit <%=Model.Album.Title %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Edit album</h2>
    
    <%Html.EnableClientValidation(); %>

    <% using (Html.BeginForm()) {%>
        <%= Html.ValidationSummary(true) %>
        
        <fieldset>
            <legend>Edit album</legend>
            
            <%--<%=Html.EditorForModel() %>
            
            <div class="editor-label"> 
                <%= Html.LabelFor(model => model.Artist.ArtistId) %> 
            </div> 
            <div class="editor-field"> 
                <%= Html.TextBoxFor(model => model.Artist.ArtistId)%> 
                <%= Html.ValidationMessageFor(model => model.Artist.ArtistId)%> 
            </div>
            
            <div class="editor-label"> 
                <%= Html.LabelFor(model => model.Genre.GenreId) %> 
            </div> 
            <div class="editor-field"> 
                <%= Html.TextBoxFor(model => model.Genre.GenreId)%> 
                <%= Html.ValidationMessageFor(model => model.Genre.GenreId)%> 
            </div>--%>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Album.AlbumId) %>: <%= Html.DisplayTextFor(model => model.Album.AlbumId) %>
            </div>
            
            <%=Html.EditorFor(model=>model.Album,
                new {Artists = Model.Artists, Genres = Model.Genres})%>
            
            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%= Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

